package com.jiezheng.huinong.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.jiezheng.huinong.dao.CommonIndexDAOImpl;
import com.opensymphony.xwork2.ActionSupport;

public class CommonIndexInfoAction extends ActionSupport {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -4296624088741283753L;
	
	// 从指标库中查出的所有的符合条件，用于进行搜索
	private List<HashMap<String, String>> infos = new ArrayList<HashMap<String, String>>();
	
	// 以下参数为接口适配参数，暂不使用，但不能去除
	private String level = "0";
	private String parent = "";
	
	/**
	 * 列出所有指标文号
	 * 
	 * @return
	 */
	public String listIndexNo() {
		infos = (new CommonIndexDAOImpl()).listIndexNo();
		return SUCCESS;
	}
	
	/**
	 * 列出所有发文日期
	 * 
	 * @return
	 */
	public String listPaperDate() {
		infos = (new CommonIndexDAOImpl()).listPaperDate();
		return SUCCESS;
	}

	/**
	 * 列出所有预算单位
	 * 
	 * @return
	 */
	public String listBudgetUnit() {
		infos = (new CommonIndexDAOImpl()).listBudgetUnit();
		return SUCCESS;
	}
	
	/**
	 * 列出所有指标来源
	 * 
	 * @return
	 */
	public String listIndexSource() {
		infos = (new CommonIndexDAOImpl()).listIndexSource();
		return SUCCESS;
	}
	
	/**
	 * 列出所有指标类型
	 * 
	 * @return
	 */
	public String listIndexType() {
		infos = (new CommonIndexDAOImpl()).listIndexType();
		return SUCCESS;
	}
	
	/**
	 * 列出所有资金性质
	 * 
	 * @return
	 */
	public String listFundProp() {
		infos = (new CommonIndexDAOImpl()).listFundProp();
		return SUCCESS;
	}
	
	/**
	 * 列出所有支付方式
	 * 
	 * @return
	 */
	public String listPayMethod() {
		infos = (new CommonIndexDAOImpl()).listPayMethod();
		return SUCCESS;
	}
	
	/**
	 * 列出所有预算项目
	 * 
	 * @return
	 */
	public String listBudgetItem() {
		infos = (new CommonIndexDAOImpl()).listBudgetItem();
		return SUCCESS;
	}
	
	/**
	 * 列出所有功能分类
	 * 
	 * @return
	 */
	public String listFuncType() {
		infos = (new CommonIndexDAOImpl()).listFuncType();
		return SUCCESS;
	}
	
	/**
	 * 列出所有经济分类
	 * 
	 * @return
	 */
	public String listFinancialType() {
		infos = (new CommonIndexDAOImpl()).listFinancialType();
		return SUCCESS;
	}

	public List<HashMap<String, String>> getInfos() {
		return infos;
	}

	public void setInfos(List<HashMap<String, String>> infos) {
		this.infos = infos;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getParent() {
		return parent;
	}

	public void setParent(String parent) {
		this.parent = parent;
	}
}
